package com.ayf.payment.game.api.mapper.platform;

import com.ayf.payment.game.api.dto.platform.MerchantChannelDTO;
import com.ayf.payment.game.api.dto.platform.MerchantPaymentProductDTO;
import com.ayf.payment.game.api.dto.platform.PaymentChannelDTO;
import com.ayf.payment.game.api.entity.platform.PaymentChannel;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface PaymentChannelMapper extends Mapper<PaymentChannel> {

    void updatePaymentChannelFlag(PaymentChannel paymentChannel);

    void updatePaymentChannelUrl(PaymentChannel paymentChannel);

    int insertPaymentChannel(PaymentChannel paymentChannel);

    Integer[] getPaymentChannelByDefault();

    Integer[] getPaymentChannelByMerchantId(@Param("merchantId") Integer merchantId);

    void delMerchantChannel(@Param("merchantId") Integer merchantId);

    void insertMerchantChannel(@Param("merchantChannelDTO") MerchantChannelDTO merchantChannelDTO);

    List<PaymentChannelDTO> selectPaymentChannel();

    PaymentChannelDTO getPaymentChannelByCid(@Param("cId") Integer channelId);

    List<PaymentChannelDTO> selectPaymentChannelAll();

    List<PaymentChannelDTO> selectPaymentChannelByType(@Param("cType") Integer cType);

    List<MerchantPaymentProductDTO> selectMerchantPaymentProduct(@Param("channelId") Integer channelId);

    MerchantPaymentProductDTO getMerchantPaymentProduct(@Param("pId") Integer pId);

    PaymentChannelDTO getPaymentChannelByCode(@Param("code")String code);
}